<html><head><title>Working with source files</title></head>
<body bgcolor="#FFFFDF" link="#009999" vlink="#006666" alink="#006666">
<font face="Arial" size="2"><p align="center"><b><font size="5">Working with source files</font></b></p>

The file menu allows you to do basic file operations like opening 
and saving source codes. 
<br>
<br>
You can edit multiple source code files at the same 
time. You can switch between them using the panel located under 
the Toolbar. Also the shortcut keys Ctrl+Tab and Ctrl+Shift+Tab can 
be used to jump to the next or previous open source file, respectively. 

<br>
<br>

The IDE allows the editing of non-sourcecode text files. In this "plain text" mode, code-related 
features such as coloring, case correction, auto complete are disabled. When saving plain text 
files, the IDE will not append its settings to the end of the file, even if this is configured 
for code files in the <a href="../reference/ide_preferences.html">Preferences</a>. 
Whether or not a file is considered a code-file or not depends on the file extension. The standard 
PureBasic file extensions (pb, pbi and pbf) are recognized as code files. More file extensions 
can be recognized as code files by configuring their extension in the "Editor" section of the 
<a href="../reference/ide_preferences.html">Preferences</a>. 

<br>
<br>

<p><b>Contents of the "File" menu:</b></p><blockquote>


<p><img src="images/ide_menu_file.png"></p>

<b>New</b> 
<br>
Create a new empty source code file. 

<br>
<br>

<b>Open</b> 
<br>
Open an existing source code file for editing. 
<br>
<br>
Any text file will be loaded into the source-editing field. You can also load binary 
files with the Open menu. These will be displayed in the internal 
<a href="../reference/ide_tools.html">File Viewer</a>. 

<br>
<br>

<b>Save</b> 
<br>
Saves the currently active source to disk. If the file isn't saved yet, you will be 
prompted for a filename. Otherwise the code will be saved in the file it was saved in before. 

<br>
<br>

<b>Save As...</b> 
<br>
Save the currently active source to a different location than it was saved before. This prompts 
you for a new filename and leaves the old file (if any) untouched. 

<br>
<br>

<b>Save All</b> 
<br>
Saves all currently opened sources. 

<br>
<br>

<b>Reload</b> 
<br>
Reloads the currently active source code from disk. This discards any changes not yet saved. 

<br>
<br>

<b>Close</b> 
<br>
Closes the currently active source code. If it was the only open code, the IDE will display a new empty file. 

<br>
<br>

<b>Close All</b> 
<br>
Closes all currently opened sources. 

<br>
<br>

<b>View changes</b> 
<br>
Shows the changes made to the current source code compared to its version that exists on the hard drive. 

<br>
<br>

<b>File format</b> 
<br>
In this submenu you can select the text encoding as well as the newline format which should be used when the currently 
active source code is saved to disk. The IDE can handle files in Ascii or UTF-8. The newline formats it can handle are 
Windows (CRLF), Linux/Unix (LF) and MacOSX (CR). The defaults for newly created source codes can be set in the 
<a href="../reference/ide_preferences.html">preferences</a>. 

<br>
<br>

<b>Preferences</b> 
<br>
Here you can change all the settings that control the look & behavior of the IDE. For a detailed 
description of that see <a href="../reference/ide_preferences.html">Customizing the IDE</a>. 

<br>
<br>

<b>Session history</b> 
<br>
Session history is a powerful tool which regularly records changes made to any files in a database. 
A session is created when the IDE launch, and is closed when the IDE quits. 
This is useful to rollback to a previous version of a file, or to find back a deleted 
or corrupted file. It's like source backup tool, limited in time (by default one month 
of recording). It's not aimed to replace a real source code version control system like SVN or GIT. It's complementary 
to have finer change trace. The source code will be stored without encryption, so if you are working on 
sensitive source code, be sure to have this database file in a secure location, or disable this feature. 
To configure the session history tool, see <a href="../reference/ide_preferences.html">preferences</a>. 

<p><img src="images/ide_sessionhistory.png"></p>


<br>
<br>

<b>Recent Files</b> 
<br>
Here you can see a list of the last accessed files. Selecting a file in this submenu will open it again. 

<br>
<br>

<b>Quit</b> 
<br>
This of course closes the IDE. You will be asked to save any non-saved source codes. 

</body></html>